//
//  NSDictionary+JSONModel.h
//  JsonCache
//
//  Created by hwj on 15/5/8.
//  Copyright (c) 2015年 travelsky. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "JSONModel.h"

@interface NSDictionary (JSONModel)
/** @name Exporting model contents */

/**
 * Export the whole object to a dictionary
 * @return dictionary containing the data model
 */
-(NSDictionary*)toDictionary;

/**
 * Export the whole object to a JSON data text string
 * @return JSON text describing the data model
 */
-(NSString*)toJSONString;

/**
 * Export the specified properties of the object to a dictionary
 * @param propertyNames the properties to export; if nil, all properties exported
 * @return dictionary containing the data model
 */
-(NSDictionary*)toDictionaryWithKeys:(NSArray*)propertyNames;

/**
 * Export the specified properties of the object to a JSON data text string
 * @param propertyNames the properties to export; if nil, all properties exported
 * @return JSON text describing the data model
 */
-(NSString*)toJSONStringWithKeys:(NSArray*)propertyNames;
@end
